home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / CD-ROM Tools / CDPlay / Include / rect.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-27  |  1.4 KB  |  60 lines

  1. //////////////////////////////////////////////////////////////////////////////
  2. // rect.hpp
  3. //
  4. // Jeffry A Worth
  5. // November 10, 1995
  6. //////////////////////////////////////////////////////////////////////////////
  7.  
  8. #ifndef __RECT_HPP__
  9. #define __RECT_HPP__
  10.  
  11. //////////////////////////////////////////////////////////////////////////////
  12. // Includes
  13. #include <exec/types.h>
  14.  
  15. //////////////////////////////////////////////////////////////////////////////
  16. // Point Class
  17.  
  18. class AFPoint
  19. {
  20. public:
  21.   AFPoint(LONG x = 0, LONG y = 0);
  22.   void SetPoint(LONG x, LONG y);
  23.   void SetPoint(AFPoint* point);
  24.   AFPoint* operator+=(AFPoint* point);
  25.   AFPoint* operator+=(AFPoint point);
  26.   AFPoint* operator-=(AFPoint* point);
  27.   AFPoint* operator-=(AFPoint point);
  28.  
  29.   LONG m_x;
  30.   LONG m_y;
  31. };
  32.  
  33. //////////////////////////////////////////////////////////////////////////////
  34. // Rect Class
  35.  
  36. class AFRect
  37. {
  38. public:
  39.   AFRect(ULONG x1, ULONG y1, ULONG x2, ULONG y2);
  40.   AFRect();
  41.  
  42.   void SetRect(ULONG x1, ULONG y1, ULONG x2, ULONG y2);
  43.   void SetRect(AFPoint* tl, AFPoint* br);
  44.   AFPoint* TopLeft();
  45.   AFPoint* BottomRight();
  46.   ULONG Width();
  47.   ULONG Height();
  48.   AFRect* operator+=(AFPoint* point);
  49.   AFRect* operator+=(AFPoint point);
  50.   AFRect* operator-=(AFPoint* point);
  51.   AFRect* operator-=(AFPoint point);
  52.  
  53. private:
  54.   AFPoint m_TopLeft;
  55.   AFPoint m_BottomRight;
  56. };
  57.  
  58. //////////////////////////////////////////////////////////////////////////////
  59. #endif // __RECT_HPP__
  60.